package com.jerp.ui.main;

public class VmMainUI {

	private final UiDescriptor desc;
	private boolean selected = true;
	private boolean embed = true;
	
	
	
	public VmMainUI(UiDescriptor desc) {
		this.desc = desc;
	}
	
	public UiDescriptor getDesc() {
		return desc;
	}

	public boolean isSelected() {
		return selected;
	}
	public void setSelected(boolean selected) {
		this.selected = selected;
	}

	public boolean isEmbed() {
		return embed;
	}

	public void setEmbed(boolean embed) {
		this.embed = embed;
		if(embed){
			selected = false;
		}
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((desc == null) ? 0 : desc.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		VmMainUI other = (VmMainUI) obj;
		if (desc == null) {
			if (other.desc != null)
				return false;
		} else if (!desc.equals(other.desc))
			return false;
		return true;
	}
	
	
	
}
